<!DOCTYPE html>

<html lang="en">
  <head>
    
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Class Phalcon\Db\Adapter\Pdo\Postgresql &mdash; Phalcon 2.0.0 文档</title>
    <meta name="keywords" content="php, phalcon, phalcon php, php framework, faster php framework"><link rel="stylesheet" type="text/css" href="../_static/bootstrap.min.css" />
    <link rel="stylesheet" type="text/css" href="http://static.phalconphp.com/css/phalcon.min.css" />
    <link href='https://fonts.googleapis.com/css?family=Open+Sans:700,400' rel='stylesheet' type='text/css'>
    <link href="http://fonts.googleapis.com/css?family=Merriweather:400,700" rel="stylesheet" type="text/css" />
    <!--
    EUROPE <link href='https://fonts.googleapis.com/css?family=Open+Sans:700,400&subset=latin-ext' rel='stylesheet' type='text/css'>
    GREEK <link href='https://fonts.googleapis.com/css?family=Open+Sans:700,400&subset=greek-ext' rel='stylesheet' type='text/css'>
    RUSSIA <link href='https://fonts.googleapis.com/css?family=Open+Sans:700,400&subset=cyrillic-ext,latin' rel='stylesheet' type='text/css'>
    -->

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <link rel="stylesheet" href="../_static/docs.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '2.0.0',
        COLLAPSE_MODINDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>

    <script src="../_static/jquery.min.js"></script>
    <script type="text/javascript" src="../_static/docs.js"></script>
    <link rel="shortcut icon" href="../_static/favicon.ico"/>
    <link rel="top" title="Phalcon 2.0.0 文档" href="../index.html" />
    <link rel="up" title="API Indice" href="index.html" />
    <link rel="next" title="Class Phalcon\Db\Adapter\Pdo\Sqlite" href="Phalcon_Db_Adapter_Pdo_Sqlite.html" />
    <link rel="prev" title="Class Phalcon\Db\Adapter\Pdo\Oracle" href="Phalcon_Db_Adapter_Pdo_Oracle.html" /> 
  </head>
  <body>

<header class="page-header">
    <nav class="navbar" role="navigation">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#main-menu-container">
                    <span class="sr-only">Toggle navigation</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span>
                </button>
                <a class="navbar-brand phalcon-logo" href="/"><span itemprop="name" class="sr-only">Phalcon PHP</span></a>
            </div>

            <div class="collapse navbar-collapse navbar-right" id="main-menu-container">
                <ul class="nav navbar-nav main-menu">
                  <li class="first"><a href="http://phalconphp.com/en/download" class="header-nav-link">Download</a></li>
                  <li><a href="http://docs.phalconphp.com/en/latest/index.html" class="header-nav-link" target="_blank">Documentation</a></li>
                  <li><a href="http://forum.phalconphp.com/" class="header-nav-link" target="_blank">Forum</a></li>
                  <li><a href="http://blog.phalconphp.com/" class="header-nav-link" target="_blank">Blog</a></li>
                  <li><a href="http://phalconphp.com/en/about">About</a></li>
                </ul>
            </div>
        </div>
    </nav>
  </header>

<div class="heading">
    <div class="container">
        <div class="row">
            <h2>Documentation</h2>
        </div>
    </div>
</div>
    <!--<div class="header-line">
      <div class="size-wrap">
        <div class="header-line-title title-white">Documentation</div>
      </div>
    </div>-->
    <div class="related">
      <ul>
        <li class="right" >
          <a href="../genindex.html" title="总目录"
             accesskey="I">索引</a></li>
        <li class="right" >
          <a href="Phalcon_Db_Adapter_Pdo_Sqlite.html" title="Class Phalcon\Db\Adapter\Pdo\Sqlite"
             accesskey="N">下一页</a> |</li>
        <li class="right" >
          <a href="Phalcon_Db_Adapter_Pdo_Oracle.html" title="Class Phalcon\Db\Adapter\Pdo\Oracle"
             accesskey="P">上一页</a> |</li>
        <li><a href="http://phalconphp.com">Home</a> &raquo;</li>
        <li><a href="../index.html">Phalcon 2.0.0 文档</a> &raquo;</li>
          <li><a href="index.html" accesskey="U">API Indice</a> &raquo;</li> 
      </ul>
    </div>  

      <table width="100%" align="center" cellpadding="0" cellspacing="0">
        <tr>
      <td class="primary-box" width="25%" valign="top">
            <div>
            <div id="searchbox" style="">
                <!--<form class="search" action="http://readthedocs.org/search/project/" method="get">
                  <input type="search" name="q" size="25" placeholder="Search">
                  <input type="submit" value="Go">
                  <input type="hidden" name="selected_facets" value="project:">
                </form>-->
                <div style="width:200px;padding:10px">
                  <gcse:searchbox-only></gcse:searchbox-only>
                </div>
            </div>
            </div>
            <div style="padding:5px;padding-left:10px">
              <div id="carbonads-container">
                <div class="carbonad"><div id="azcarbon"></div>
                <script type="text/javascript">var z = document.createElement("script"); z.type = "text/javascript"; z.async = true; z.src = "http://engine.carbonads.com/z/56496/azcarbon_2_1_0_VERT"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(z, s);</script>
                </div></div>
            </div>
            <h3><a href="../index.html">內容目录</a></h3>
            <ul>
<li><a class="reference internal" href="#">Class <strong>Phalcon\Db\Adapter\Pdo\Postgresql</strong></a><ul>
<li><a class="reference internal" href="#methods">Methods</a></li>
</ul>
</li>
</ul>

            <h4>上一个主题</h4>
            <p class="topless"><a href="Phalcon_Db_Adapter_Pdo_Oracle.html" title="上一章">&lt; Class <strong>Phalcon\Db\Adapter\Pdo\Oracle</strong></a></p>
            <h4>下一个主题</h4>
            <p class="topless"><a href="Phalcon_Db_Adapter_Pdo_Sqlite.html" title="下一章">Class <strong>Phalcon\Db\Adapter\Pdo\Sqlite</strong> &gt;</a></p>
            <h3>本页</h3>
            <ul class="this-page-menu">
              <li><a href="../_sources/api/Phalcon_Db_Adapter_Pdo_Postgresql.txt" rel="nofollow">显示源代码</a></li>
            </ul>
        </td>
          <td class="second-box" valign="top">
            <div class="document">
                <div class="documentwrapper">
                  <div class="bodywrapper">
                    <div class="body" >
                      
  <div class="section" id="class-phalcon-db-adapter-pdo-postgresql">
<h1>Class <strong>Phalcon\Db\Adapter\Pdo\Postgresql</strong><a class="headerlink" href="#class-phalcon-db-adapter-pdo-postgresql" title="永久链接至标题">¶</a></h1>
<p><em>extends</em> abstract class <a class="reference internal" href="Phalcon_Db_Adapter_Pdo.html"><em>Phalcon\Db\Adapter\Pdo</em></a></p>
<p><em>implements</em> <a class="reference internal" href="Phalcon_Events_EventsAwareInterface.html"><em>Phalcon\Events\EventsAwareInterface</em></a>, <a class="reference internal" href="Phalcon_Db_AdapterInterface.html"><em>Phalcon\Db\AdapterInterface</em></a></p>
<p>Specific functions for the Postgresql database system</p>
<div class="highlight-php"><div class="highlight"><pre><span class="cp">&lt;?php</span>

 <span class="nv">$config</span> <span class="o">=</span> <span class="k">array</span><span class="p">(</span>
  <span class="s2">&quot;host&quot;</span> <span class="o">=&gt;</span> <span class="s2">&quot;192.168.0.11&quot;</span><span class="p">,</span>
  <span class="s2">&quot;dbname&quot;</span> <span class="o">=&gt;</span> <span class="s2">&quot;blog&quot;</span><span class="p">,</span>
  <span class="s2">&quot;username&quot;</span> <span class="o">=&gt;</span> <span class="s2">&quot;postgres&quot;</span><span class="p">,</span>
  <span class="s2">&quot;password&quot;</span> <span class="o">=&gt;</span> <span class="s2">&quot;&quot;</span>
 <span class="p">);</span>

 <span class="nv">$connection</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">\Phalcon\Db\Adapter\Pdo\Postgresql</span><span class="p">(</span><span class="nv">$config</span><span class="p">);</span>
</pre></div>
</div>
<div class="section" id="methods">
<h2>Methods<a class="headerlink" href="#methods" title="永久链接至标题">¶</a></h2>
<p>public <em>boolean</em>  <strong>connect</strong> ([<em>array</em> $descriptor])</p>
<p>This method is automatically called in Phalcon\Db\Adapter\Pdo constructor. Call it when you need to restore a database connection.</p>
<p>public <a class="reference internal" href="Phalcon_Db_Column.html"><em>Phalcon\Db\Column</em></a> [] <strong>describeColumns</strong> (<em>unknown</em> $table, [<em>unknown</em> $schema])</p>
<p>Returns an array of Phalcon\Db\Column objects describing a table</p>
<div class="highlight-php"><div class="highlight"><pre><span class="cp">&lt;?php</span>

 <span class="nb">print_r</span><span class="p">(</span><span class="nv">$connection</span><span class="o">-&gt;</span><span class="na">describeColumns</span><span class="p">(</span><span class="s2">&quot;posts&quot;</span><span class="p">));</span>
</pre></div>
</div>
<p>public <em>boolean</em>  <strong>useExplicitIdValue</strong> ()</p>
<p>Check whether the database system requires an explicit value for identity columns</p>
<p>public <a class="reference internal" href="Phalcon_Db_RawValue.html"><em>Phalcon\Db\RawValue</em></a>  <strong>getDefaultIdValue</strong> ()</p>
<p>Returns the default identity value to be inserted in an identity column</p>
<div class="highlight-php"><div class="highlight"><pre><span class="cp">&lt;?php</span>

 <span class="c1">//Inserting a new robot with a valid default value for the column &#39;id&#39;</span>
 <span class="nv">$success</span> <span class="o">=</span> <span class="nv">$connection</span><span class="o">-&gt;</span><span class="na">insert</span><span class="p">(</span>
     <span class="s2">&quot;robots&quot;</span><span class="p">,</span>
     <span class="k">array</span><span class="p">(</span><span class="nv">$connection</span><span class="o">-&gt;</span><span class="na">getDefaultIdValue</span><span class="p">(),</span> <span class="s2">&quot;Astro Boy&quot;</span><span class="p">,</span> <span class="mi">1952</span><span class="p">),</span>
     <span class="k">array</span><span class="p">(</span><span class="s2">&quot;id&quot;</span><span class="p">,</span> <span class="s2">&quot;name&quot;</span><span class="p">,</span> <span class="s2">&quot;year&quot;</span><span class="p">)</span>
 <span class="p">);</span>
</pre></div>
</div>
<p>public <em>boolean</em>  <strong>supportSequences</strong> ()</p>
<p>Check whether the database system requires a sequence to produce auto-numeric values</p>
<p>public  <strong>__construct</strong> (<em>unknown</em> $descriptor) inherited from Phalcon\Db\Adapter\Pdo</p>
<p>Constructor for Phalcon\Db\Adapter\Pdo</p>
<p>public <em>PDOStatement</em>  <strong>prepare</strong> (<em>unknown</em> $sqlStatement) inherited from Phalcon\Db\Adapter\Pdo</p>
<p>Returns a PDO prepared statement to be executed with &#8216;executePrepared&#8217;</p>
<div class="highlight-php"><div class="highlight"><pre><span class="cp">&lt;?php</span>

 <span class="nv">$statement</span> <span class="o">=</span> <span class="nv">$db</span><span class="o">-&gt;</span><span class="na">prepare</span><span class="p">(</span><span class="s1">&#39;SELECT * FROM robots WHERE name = :name&#39;</span><span class="p">);</span>
 <span class="nv">$result</span> <span class="o">=</span> <span class="nv">$connection</span><span class="o">-&gt;</span><span class="na">executePrepared</span><span class="p">(</span><span class="nv">$statement</span><span class="p">,</span> <span class="k">array</span><span class="p">(</span><span class="s1">&#39;name&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;Voltron&#39;</span><span class="p">));</span>
</pre></div>
</div>
<p>public <em>PDOStatement</em>  <strong>executePrepared</strong> (<em>unknown</em> $statement, <em>unknown</em> $placeholders, <em>unknown</em> $dataTypes) inherited from Phalcon\Db\Adapter\Pdo</p>
<p>Executes a prepared statement binding. This function uses integer indexes starting from zero</p>
<div class="highlight-php"><div class="highlight"><pre><span class="cp">&lt;?php</span>

 <span class="nv">$statement</span> <span class="o">=</span> <span class="nv">$db</span><span class="o">-&gt;</span><span class="na">prepare</span><span class="p">(</span><span class="s1">&#39;SELECT * FROM robots WHERE name = :name&#39;</span><span class="p">);</span>
 <span class="nv">$result</span> <span class="o">=</span> <span class="nv">$connection</span><span class="o">-&gt;</span><span class="na">executePrepared</span><span class="p">(</span><span class="nv">$statement</span><span class="p">,</span> <span class="k">array</span><span class="p">(</span><span class="s1">&#39;name&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;Voltron&#39;</span><span class="p">));</span>
</pre></div>
</div>
<p>public <a class="reference internal" href="Phalcon_Db_ResultInterface.html"><em>Phalcon\Db\ResultInterface</em></a> <a href="#id1"><span class="problematic" id="id2">|</span></a>bool <strong>query</strong> (<em>unknown</em> $sqlStatement, [<em>unknown</em> $bindParams], [<em>unknown</em> $bindTypes]) inherited from Phalcon\Db\Adapter\Pdo</p>
<p>Sends SQL statements to the database server returning the success state. Use this method only when the SQL statement sent to the server is returning rows</p>
<div class="highlight-php"><div class="highlight"><pre><span class="cp">&lt;?php</span>

<span class="c1">//Querying data</span>
<span class="nv">$resultset</span> <span class="o">=</span> <span class="nv">$connection</span><span class="o">-&gt;</span><span class="na">query</span><span class="p">(</span><span class="s2">&quot;SELECT * FROM robots WHERE type=&#39;mechanical&#39;&quot;</span><span class="p">);</span>
<span class="nv">$resultset</span> <span class="o">=</span> <span class="nv">$connection</span><span class="o">-&gt;</span><span class="na">query</span><span class="p">(</span><span class="s2">&quot;SELECT * FROM robots WHERE type=?&quot;</span><span class="p">,</span> <span class="k">array</span><span class="p">(</span><span class="s2">&quot;mechanical&quot;</span><span class="p">));</span>
</pre></div>
</div>
<p>public <em>boolean</em>  <strong>execute</strong> (<em>unknown</em> $sqlStatement, [<em>unknown</em> $bindParams], [<em>unknown</em> $bindTypes]) inherited from Phalcon\Db\Adapter\Pdo</p>
<p>Sends SQL statements to the database server returning the success state. Use this method only when the SQL statement sent to the server doesn&#8217;t return any row</p>
<div class="highlight-php"><div class="highlight"><pre><span class="cp">&lt;?php</span>

<span class="c1">//Inserting data</span>
<span class="nv">$success</span> <span class="o">=</span> <span class="nv">$connection</span><span class="o">-&gt;</span><span class="na">execute</span><span class="p">(</span><span class="s2">&quot;INSERT INTO robots VALUES (1, &#39;Astro Boy&#39;)&quot;</span><span class="p">);</span>
<span class="nv">$success</span> <span class="o">=</span> <span class="nv">$connection</span><span class="o">-&gt;</span><span class="na">execute</span><span class="p">(</span><span class="s2">&quot;INSERT INTO robots VALUES (?, ?)&quot;</span><span class="p">,</span> <span class="k">array</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="s1">&#39;Astro Boy&#39;</span><span class="p">));</span>
</pre></div>
</div>
<p>public <em>int</em>  <strong>affectedRows</strong> () inherited from Phalcon\Db\Adapter\Pdo</p>
<p>Returns the number of affected rows by the lastest INSERT/UPDATE/DELETE executed in the database system</p>
<div class="highlight-php"><div class="highlight"><pre><span class="cp">&lt;?php</span>

<span class="nv">$connection</span><span class="o">-&gt;</span><span class="na">execute</span><span class="p">(</span><span class="s2">&quot;DELETE FROM robots&quot;</span><span class="p">);</span>
<span class="k">echo</span> <span class="nv">$connection</span><span class="o">-&gt;</span><span class="na">affectedRows</span><span class="p">(),</span> <span class="s1">&#39; were deleted&#39;</span><span class="p">;</span>
</pre></div>
</div>
<p>public <em>boolean</em>  <strong>close</strong> () inherited from Phalcon\Db\Adapter\Pdo</p>
<p>Closes the active connection returning success. Phalcon automatically closes and destroys active connections when the request ends</p>
<p>public <em>string</em>  <strong>escapeIdentifier</strong> (<em>unknown</em> $identifier) inherited from Phalcon\Db\Adapter\Pdo</p>
<p>Escapes a column/table/schema name</p>
<div class="highlight-php"><div class="highlight"><pre><span class="cp">&lt;?php</span>

<span class="nv">$escapedTable</span> <span class="o">=</span> <span class="nv">$connection</span><span class="o">-&gt;</span><span class="na">escapeIdentifier</span><span class="p">(</span><span class="s1">&#39;robots&#39;</span><span class="p">);</span>
<span class="nv">$escapedTable</span> <span class="o">=</span> <span class="nv">$connection</span><span class="o">-&gt;</span><span class="na">escapeIdentifier</span><span class="p">(</span><span class="k">array</span><span class="p">(</span><span class="s1">&#39;store&#39;</span><span class="p">,</span> <span class="s1">&#39;robots&#39;</span><span class="p">));</span>
</pre></div>
</div>
<p>public <em>string</em>  <strong>escapeString</strong> (<em>unknown</em> $str) inherited from Phalcon\Db\Adapter\Pdo</p>
<p>Escapes a value to avoid SQL injections according to the active charset in the connection</p>
<div class="highlight-php"><div class="highlight"><pre><span class="cp">&lt;?php</span>

<span class="nv">$escapedStr</span> <span class="o">=</span> <span class="nv">$connection</span><span class="o">-&gt;</span><span class="na">escapeString</span><span class="p">(</span><span class="s1">&#39;some dangerous value&#39;</span><span class="p">);</span>
</pre></div>
</div>
<p>public <em>array</em>  <strong>convertBoundParams</strong> (<em>string</em> $sql, [<em>array</em> $params]) inherited from Phalcon\Db\Adapter\Pdo</p>
<p>Converts bound parameters such as :name: or ?1 into PDO bind params ?</p>
<div class="highlight-php"><div class="highlight"><pre><span class="cp">&lt;?php</span>

 <span class="nb">print_r</span><span class="p">(</span><span class="nv">$connection</span><span class="o">-&gt;</span><span class="na">convertBoundParams</span><span class="p">(</span><span class="s1">&#39;SELECT * FROM robots WHERE name = :name:&#39;</span><span class="p">,</span> <span class="k">array</span><span class="p">(</span><span class="s1">&#39;Bender&#39;</span><span class="p">)));</span>
</pre></div>
</div>
<p>public <em>int|boolean</em>  <strong>lastInsertId</strong> ([<em>unknown</em> $sequenceName]) inherited from Phalcon\Db\Adapter\Pdo</p>
<p>Returns the insert id for the auto_increment/serial column inserted in the lastest executed SQL statement</p>
<div class="highlight-php"><div class="highlight"><pre><span class="cp">&lt;?php</span>

 <span class="c1">//Inserting a new robot</span>
 <span class="nv">$success</span> <span class="o">=</span> <span class="nv">$connection</span><span class="o">-&gt;</span><span class="na">insert</span><span class="p">(</span>
     <span class="s2">&quot;robots&quot;</span><span class="p">,</span>
     <span class="k">array</span><span class="p">(</span><span class="s2">&quot;Astro Boy&quot;</span><span class="p">,</span> <span class="mi">1952</span><span class="p">),</span>
     <span class="k">array</span><span class="p">(</span><span class="s2">&quot;name&quot;</span><span class="p">,</span> <span class="s2">&quot;year&quot;</span><span class="p">)</span>
 <span class="p">);</span>

 <span class="c1">//Getting the generated id</span>
 <span class="nv">$id</span> <span class="o">=</span> <span class="nv">$connection</span><span class="o">-&gt;</span><span class="na">lastInsertId</span><span class="p">();</span>
</pre></div>
</div>
<p>public <em>boolean</em>  <strong>begin</strong> ([<em>unknown</em> $nesting]) inherited from Phalcon\Db\Adapter\Pdo</p>
<p>Starts a transaction in the connection</p>
<p>public <em>boolean</em>  <strong>rollback</strong> ([<em>unknown</em> $nesting]) inherited from Phalcon\Db\Adapter\Pdo</p>
<p>Rollbacks the active transaction in the connection</p>
<p>public <em>boolean</em>  <strong>commit</strong> ([<em>unknown</em> $nesting]) inherited from Phalcon\Db\Adapter\Pdo</p>
<p>Commits the active transaction in the connection</p>
<p>public <em>int</em>  <strong>getTransactionLevel</strong> () inherited from Phalcon\Db\Adapter\Pdo</p>
<p>Returns the current transaction nesting level</p>
<p>public <em>boolean</em>  <strong>isUnderTransaction</strong> () inherited from Phalcon\Db\Adapter\Pdo</p>
<p>Checks whether the connection is under a transaction</p>
<div class="highlight-php"><div class="highlight"><pre><span class="cp">&lt;?php</span>

<span class="nv">$connection</span><span class="o">-&gt;</span><span class="na">begin</span><span class="p">();</span>
<span class="nb">var_dump</span><span class="p">(</span><span class="nv">$connection</span><span class="o">-&gt;</span><span class="na">isUnderTransaction</span><span class="p">());</span> <span class="c1">//true</span>
</pre></div>
</div>
<p>public <em>PDO</em>  <strong>getInternalHandler</strong> () inherited from Phalcon\Db\Adapter\Pdo</p>
<p>Return internal PDO handler</p>
<p>public <em>array</em>  <strong>getErrorInfo</strong> () inherited from Phalcon\Db\Adapter\Pdo</p>
<p>Return the error info, if any</p>
<p>public  <strong>getDialectType</strong> () inherited from Phalcon\Db\Adapter</p>
<p>Name of the dialect used</p>
<p>public  <strong>getType</strong> () inherited from Phalcon\Db\Adapter</p>
<p>Type of database system the adapter is used for</p>
<p>public  <strong>getSqlVariables</strong> () inherited from Phalcon\Db\Adapter</p>
<p>Active SQL bound parameter variables</p>
<p>public  <strong>setEventsManager</strong> (<em>unknown</em> $eventsManager) inherited from Phalcon\Db\Adapter</p>
<p>Sets the event manager</p>
<p>public <a class="reference internal" href="Phalcon_Events_ManagerInterface.html"><em>Phalcon\Events\ManagerInterface</em></a>  <strong>getEventsManager</strong> () inherited from Phalcon\Db\Adapter</p>
<p>Returns the internal event manager</p>
<p>public  <strong>setDialect</strong> (<em>unknown</em> $dialect) inherited from Phalcon\Db\Adapter</p>
<p>Sets the dialect used to produce the SQL</p>
<p>public <a class="reference internal" href="Phalcon_Db_DialectInterface.html"><em>Phalcon\Db\DialectInterface</em></a>  <strong>getDialect</strong> () inherited from Phalcon\Db\Adapter</p>
<p>Returns internal dialect instance</p>
<p>public <em>array</em>  <strong>fetchOne</strong> (<em>unknown</em> $sqlQuery, [<em>unknown</em> $fetchMode], [<em>unknown</em> $bindParams], [<em>unknown</em> $bindTypes]) inherited from Phalcon\Db\Adapter</p>
<p>Returns the first row in a SQL query result</p>
<div class="highlight-php"><div class="highlight"><pre><span class="cp">&lt;?php</span>

<span class="c1">//Getting first robot</span>
<span class="nv">$robot</span> <span class="o">=</span> <span class="nv">$connection</span><span class="o">-&gt;</span><span class="na">fecthOne</span><span class="p">(</span><span class="s2">&quot;SELECT * FROM robots&quot;</span><span class="p">);</span>
<span class="nb">print_r</span><span class="p">(</span><span class="nv">$robot</span><span class="p">);</span>

<span class="c1">//Getting first robot with associative indexes only</span>
<span class="nv">$robot</span> <span class="o">=</span> <span class="nv">$connection</span><span class="o">-&gt;</span><span class="na">fecthOne</span><span class="p">(</span><span class="s2">&quot;SELECT * FROM robots&quot;</span><span class="p">,</span> <span class="nx">Phalcon\Db</span><span class="o">::</span><span class="na">FETCH_ASSOC</span><span class="p">);</span>
<span class="nb">print_r</span><span class="p">(</span><span class="nv">$robot</span><span class="p">);</span>
</pre></div>
</div>
<p>public <em>array</em>  <strong>fetchAll</strong> (<em>unknown</em> $sqlQuery, [<em>unknown</em> $fetchMode], [<em>unknown</em> $bindParams], [<em>unknown</em> $bindTypes]) inherited from Phalcon\Db\Adapter</p>
<p>Dumps the complete result of a query into an array</p>
<div class="highlight-php"><div class="highlight"><pre><span class="cp">&lt;?php</span>

<span class="c1">//Getting all robots with associative indexes only</span>
<span class="nv">$robots</span> <span class="o">=</span> <span class="nv">$connection</span><span class="o">-&gt;</span><span class="na">fetchAll</span><span class="p">(</span><span class="s2">&quot;SELECT * FROM robots&quot;</span><span class="p">,</span> <span class="nx">Phalcon\Db</span><span class="o">::</span><span class="na">FETCH_ASSOC</span><span class="p">);</span>
<span class="k">foreach</span> <span class="p">(</span><span class="nv">$robots</span> <span class="k">as</span> <span class="nv">$robot</span><span class="p">)</span> <span class="p">{</span>
    <span class="nb">print_r</span><span class="p">(</span><span class="nv">$robot</span><span class="p">);</span>
<span class="p">}</span>

  <span class="c1">//Getting all robots that contains word &quot;robot&quot; withing the name</span>
  <span class="nv">$robots</span> <span class="o">=</span> <span class="nv">$connection</span><span class="o">-&gt;</span><span class="na">fetchAll</span><span class="p">(</span><span class="s2">&quot;SELECT * FROM robots WHERE name LIKE :name&quot;</span><span class="p">,</span>
    <span class="nx">Phalcon\Db</span><span class="o">::</span><span class="na">FETCH_ASSOC</span><span class="p">,</span>
    <span class="k">array</span><span class="p">(</span><span class="s1">&#39;name&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;%robot%&#39;</span><span class="p">)</span>
  <span class="p">);</span>
<span class="k">foreach</span><span class="p">(</span><span class="nv">$robots</span> <span class="k">as</span> <span class="nv">$robot</span><span class="p">){</span>
    <span class="nb">print_r</span><span class="p">(</span><span class="nv">$robot</span><span class="p">);</span>
<span class="p">}</span>
</pre></div>
</div>
<p>public <em>string|</em>  <strong>fetchColumn</strong> (<em>unknown</em> $sqlQuery, [<em>unknown</em> $placeholders], [<em>unknown</em> $column]) inherited from Phalcon\Db\Adapter</p>
<p>Returns the n&#8217;th field of first row in a SQL query result</p>
<div class="highlight-php"><div class="highlight"><pre><span class="cp">&lt;?php</span>

    <span class="c1">//Getting count of robots</span>
    <span class="nv">$robotsCount</span> <span class="o">=</span> <span class="nv">$connection</span><span class="o">-&gt;</span><span class="na">fetchColumn</span><span class="p">(</span><span class="s2">&quot;SELECT count(*) FROM robots&quot;</span><span class="p">);</span>
    <span class="nb">print_r</span><span class="p">(</span><span class="nv">$robotsCount</span><span class="p">);</span>

    <span class="c1">//Getting name of last edited robot</span>
    <span class="nv">$robot</span> <span class="o">=</span> <span class="nv">$connection</span><span class="o">-&gt;</span><span class="na">fetchColumn</span><span class="p">(</span><span class="s2">&quot;SELECT id, name FROM robots order by modified desc&quot;</span><span class="p">);</span>
    <span class="nb">print_r</span><span class="p">(</span><span class="nv">$robot</span><span class="p">);</span>
</pre></div>
</div>
<p>public <em>boolean</em>  <strong>insert</strong> (<em>unknown</em> $table, <em>unknown</em> $values, [<em>unknown</em> $fields], [<em>unknown</em> $dataTypes]) inherited from Phalcon\Db\Adapter</p>
<p>Inserts data into a table using custom RBDM SQL syntax</p>
<div class="highlight-php"><div class="highlight"><pre><span class="cp">&lt;?php</span>

 <span class="c1">//Inserting a new robot</span>
 <span class="nv">$success</span> <span class="o">=</span> <span class="nv">$connection</span><span class="o">-&gt;</span><span class="na">insert</span><span class="p">(</span>
     <span class="s2">&quot;robots&quot;</span><span class="p">,</span>
     <span class="k">array</span><span class="p">(</span><span class="s2">&quot;Astro Boy&quot;</span><span class="p">,</span> <span class="mi">1952</span><span class="p">),</span>
     <span class="k">array</span><span class="p">(</span><span class="s2">&quot;name&quot;</span><span class="p">,</span> <span class="s2">&quot;year&quot;</span><span class="p">)</span>
 <span class="p">);</span>

 <span class="c1">//Next SQL sentence is sent to the database system</span>
 <span class="nx">INSERT</span> <span class="nx">INTO</span> <span class="sb">`robots`</span> <span class="p">(</span><span class="sb">`name`</span><span class="p">,</span> <span class="sb">`year`</span><span class="p">)</span> <span class="nx">VALUES</span> <span class="p">(</span><span class="s2">&quot;Astro boy&quot;</span><span class="p">,</span> <span class="mi">1952</span><span class="p">);</span>
</pre></div>
</div>
<p>public <em>boolean</em>  <strong>insertAsDict</strong> (<em>unknown</em> $table, <em>unknown</em> $data, [<em>unknown</em> $dataTypes]) inherited from Phalcon\Db\Adapter</p>
<p>Inserts data into a table using custom RBDM SQL syntax Another, more convenient syntax</p>
<div class="highlight-php"><div class="highlight"><pre><span class="cp">&lt;?php</span>

 <span class="c1">//Inserting a new robot</span>
 <span class="nv">$success</span> <span class="o">=</span> <span class="nv">$connection</span><span class="o">-&gt;</span><span class="na">insert</span><span class="p">(</span>
     <span class="s2">&quot;robots&quot;</span><span class="p">,</span>
     <span class="k">array</span><span class="p">(</span>
          <span class="s2">&quot;name&quot;</span> <span class="o">=&gt;</span> <span class="s2">&quot;Astro Boy&quot;</span><span class="p">,</span>
          <span class="s2">&quot;year&quot;</span> <span class="o">=&gt;</span> <span class="mi">1952</span>
      <span class="p">)</span>
 <span class="p">);</span>

 <span class="c1">//Next SQL sentence is sent to the database system</span>
 <span class="nx">INSERT</span> <span class="nx">INTO</span> <span class="sb">`robots`</span> <span class="p">(</span><span class="sb">`name`</span><span class="p">,</span> <span class="sb">`year`</span><span class="p">)</span> <span class="nx">VALUES</span> <span class="p">(</span><span class="s2">&quot;Astro boy&quot;</span><span class="p">,</span> <span class="mi">1952</span><span class="p">);</span>
</pre></div>
</div>
<p>public <em>boolean</em>  <strong>update</strong> (<em>unknown</em> $table, <em>unknown</em> $fields, <em>unknown</em> $values, [<em>unknown</em> $whereCondition], [<em>unknown</em> $dataTypes]) inherited from Phalcon\Db\Adapter</p>
<p>Updates data on a table using custom RBDM SQL syntax</p>
<div class="highlight-php"><div class="highlight"><pre><span class="cp">&lt;?php</span>

 <span class="c1">//Updating existing robot</span>
 <span class="nv">$success</span> <span class="o">=</span> <span class="nv">$connection</span><span class="o">-&gt;</span><span class="na">update</span><span class="p">(</span>
     <span class="s2">&quot;robots&quot;</span><span class="p">,</span>
     <span class="k">array</span><span class="p">(</span><span class="s2">&quot;name&quot;</span><span class="p">),</span>
     <span class="k">array</span><span class="p">(</span><span class="s2">&quot;New Astro Boy&quot;</span><span class="p">),</span>
     <span class="s2">&quot;id = 101&quot;</span>
 <span class="p">);</span>

 <span class="c1">//Next SQL sentence is sent to the database system</span>
 <span class="nx">UPDATE</span> <span class="sb">`robots`</span> <span class="nx">SET</span> <span class="sb">`name`</span> <span class="o">=</span> <span class="s2">&quot;Astro boy&quot;</span> <span class="nx">WHERE</span> <span class="nx">id</span> <span class="o">=</span> <span class="mi">101</span>

 <span class="c1">//Updating existing robot with array condition and $dataTypes</span>
 <span class="nv">$success</span> <span class="o">=</span> <span class="nv">$connection</span><span class="o">-&gt;</span><span class="na">update</span><span class="p">(</span>
     <span class="s2">&quot;robots&quot;</span><span class="p">,</span>
     <span class="k">array</span><span class="p">(</span><span class="s2">&quot;name&quot;</span><span class="p">),</span>
     <span class="k">array</span><span class="p">(</span><span class="s2">&quot;New Astro Boy&quot;</span><span class="p">),</span>
     <span class="k">array</span><span class="p">(</span>
         <span class="s1">&#39;conditions&#39;</span> <span class="o">=&gt;</span> <span class="s2">&quot;id = ?&quot;</span><span class="p">,</span>
         <span class="s1">&#39;bind&#39;</span> <span class="o">=&gt;</span> <span class="k">array</span><span class="p">(</span><span class="nv">$some_unsafe_id</span><span class="p">),</span>
         <span class="s1">&#39;bindTypes&#39;</span> <span class="o">=&gt;</span> <span class="k">array</span><span class="p">(</span><span class="nx">PDO</span><span class="o">::</span><span class="na">PARAM_INT</span><span class="p">)</span> <span class="c1">//use only if you use $dataTypes param</span>
     <span class="p">),</span>
     <span class="k">array</span><span class="p">(</span><span class="nx">PDO</span><span class="o">::</span><span class="na">PARAM_STR</span><span class="p">)</span>
 <span class="p">);</span>
</pre></div>
</div>
<p>Warning! If $whereCondition is string it not escaped.</p>
<p>public <em>boolean</em>  <strong>updateAsDict</strong> (<em>unknown</em> $table, <em>unknown</em> $data, [<em>unknown</em> $whereCondition], [<em>unknown</em> $dataTypes]) inherited from Phalcon\Db\Adapter</p>
<p>Updates data on a table using custom RBDM SQL syntax Another, more convenient syntax</p>
<div class="highlight-php"><div class="highlight"><pre><span class="cp">&lt;?php</span>

 <span class="c1">//Updating existing robot</span>
 <span class="nv">$success</span> <span class="o">=</span> <span class="nv">$connection</span><span class="o">-&gt;</span><span class="na">update</span><span class="p">(</span>
     <span class="s2">&quot;robots&quot;</span><span class="p">,</span>
     <span class="k">array</span><span class="p">(</span>
          <span class="s2">&quot;name&quot;</span> <span class="o">=&gt;</span> <span class="s2">&quot;New Astro Boy&quot;</span>
      <span class="p">),</span>
     <span class="s2">&quot;id = 101&quot;</span>
 <span class="p">);</span>

 <span class="c1">//Next SQL sentence is sent to the database system</span>
 <span class="nx">UPDATE</span> <span class="sb">`robots`</span> <span class="nx">SET</span> <span class="sb">`name`</span> <span class="o">=</span> <span class="s2">&quot;Astro boy&quot;</span> <span class="nx">WHERE</span> <span class="nx">id</span> <span class="o">=</span> <span class="mi">101</span>
</pre></div>
</div>
<p>public <em>boolean</em>  <strong>delete</strong> (<em>unknown</em> $table, [<em>unknown</em> $whereCondition], [<em>unknown</em> $placeholders], [<em>unknown</em> $dataTypes]) inherited from Phalcon\Db\Adapter</p>
<p>Deletes data from a table using custom RBDM SQL syntax</p>
<div class="highlight-php"><div class="highlight"><pre><span class="cp">&lt;?php</span>

 <span class="c1">//Deleting existing robot</span>
 <span class="nv">$success</span> <span class="o">=</span> <span class="nv">$connection</span><span class="o">-&gt;</span><span class="na">delete</span><span class="p">(</span>
     <span class="s2">&quot;robots&quot;</span><span class="p">,</span>
     <span class="s2">&quot;id = 101&quot;</span>
 <span class="p">);</span>

 <span class="c1">//Next SQL sentence is generated</span>
 <span class="nx">DELETE</span> <span class="nx">FROM</span> <span class="sb">`robots`</span> <span class="nx">WHERE</span> <span class="sb">`id`</span> <span class="o">=</span> <span class="mi">101</span>
</pre></div>
</div>
<p>public <em>string</em>  <strong>getColumnList</strong> (<em>unknown</em> $columnList) inherited from Phalcon\Db\Adapter</p>
<p>Gets a list of columns</p>
<p>public <em>string</em>  <strong>limit</strong> (<em>unknown</em> $sqlQuery, <em>unknown</em> $number) inherited from Phalcon\Db\Adapter</p>
<p>Appends a LIMIT clause to $sqlQuery argument</p>
<div class="highlight-php"><div class="highlight"><pre><span class="cp">&lt;?php</span>

    <span class="k">echo</span> <span class="nv">$connection</span><span class="o">-&gt;</span><span class="na">limit</span><span class="p">(</span><span class="s2">&quot;SELECT * FROM robots&quot;</span><span class="p">,</span> <span class="mi">5</span><span class="p">);</span>
</pre></div>
</div>
<p>public <em>boolean</em>  <strong>tableExists</strong> (<em>unknown</em> $tableName, [<em>unknown</em> $schemaName]) inherited from Phalcon\Db\Adapter</p>
<p>Generates SQL checking for the existence of a schema.table</p>
<div class="highlight-php"><div class="highlight"><pre><span class="cp">&lt;?php</span>

    <span class="nb">var_dump</span><span class="p">(</span><span class="nv">$connection</span><span class="o">-&gt;</span><span class="na">tableExists</span><span class="p">(</span><span class="s2">&quot;blog&quot;</span><span class="p">,</span> <span class="s2">&quot;posts&quot;</span><span class="p">));</span>
</pre></div>
</div>
<p>public <em>boolean</em>  <strong>viewExists</strong> (<em>unknown</em> $viewName, [<em>unknown</em> $schemaName]) inherited from Phalcon\Db\Adapter</p>
<p>Generates SQL checking for the existence of a schema.view</p>
<div class="highlight-php"><div class="highlight"><pre><span class="cp">&lt;?php</span>

 <span class="nb">var_dump</span><span class="p">(</span><span class="nv">$connection</span><span class="o">-&gt;</span><span class="na">viewExists</span><span class="p">(</span><span class="s2">&quot;active_users&quot;</span><span class="p">,</span> <span class="s2">&quot;posts&quot;</span><span class="p">));</span>
</pre></div>
</div>
<p>public <em>string</em>  <strong>forUpdate</strong> (<em>unknown</em> $sqlQuery) inherited from Phalcon\Db\Adapter</p>
<p>Returns a SQL modified with a FOR UPDATE clause</p>
<p>public <em>string</em>  <strong>sharedLock</strong> (<em>unknown</em> $sqlQuery) inherited from Phalcon\Db\Adapter</p>
<p>Returns a SQL modified with a LOCK IN SHARE MODE clause</p>
<p>public <em>boolean</em>  <strong>createTable</strong> (<em>unknown</em> $tableName, <em>unknown</em> $schemaName, <em>unknown</em> $definition) inherited from Phalcon\Db\Adapter</p>
<p>Creates a table</p>
<p>public <em>boolean</em>  <strong>dropTable</strong> (<em>unknown</em> $tableName, [<em>unknown</em> $schemaName], [<em>unknown</em> $ifExists]) inherited from Phalcon\Db\Adapter</p>
<p>Drops a table from a schema/database</p>
<p>public <em>boolean</em>  <strong>createView</strong> (<em>unknown</em> $viewName, <em>unknown</em> $definition, [<em>unknown</em> $schemaName]) inherited from Phalcon\Db\Adapter</p>
<p>Creates a view</p>
<p>public <em>boolean</em>  <strong>dropView</strong> (<em>unknown</em> $viewName, [<em>unknown</em> $schemaName], [<em>unknown</em> $ifExists]) inherited from Phalcon\Db\Adapter</p>
<p>Drops a view</p>
<p>public <em>boolean</em>  <strong>addColumn</strong> (<em>unknown</em> $tableName, <em>unknown</em> $schemaName, <em>unknown</em> $column) inherited from Phalcon\Db\Adapter</p>
<p>Adds a column to a table</p>
<p>public <em>boolean</em>  <strong>modifyColumn</strong> (<em>unknown</em> $tableName, <em>unknown</em> $schemaName, <em>unknown</em> $column) inherited from Phalcon\Db\Adapter</p>
<p>Modifies a table column based on a definition</p>
<p>public <em>boolean</em>  <strong>dropColumn</strong> (<em>unknown</em> $tableName, <em>unknown</em> $schemaName, <em>unknown</em> $columnName) inherited from Phalcon\Db\Adapter</p>
<p>Drops a column from a table</p>
<p>public <em>boolean</em>  <strong>addIndex</strong> (<em>unknown</em> $tableName, <em>unknown</em> $schemaName, <em>unknown</em> $index) inherited from Phalcon\Db\Adapter</p>
<p>Adds an index to a table</p>
<p>public <em>boolean</em>  <strong>dropIndex</strong> (<em>unknown</em> $tableName, <em>unknown</em> $schemaName, <em>unknown</em> $indexName) inherited from Phalcon\Db\Adapter</p>
<p>Drop an index from a table</p>
<p>public <em>boolean</em>  <strong>addPrimaryKey</strong> (<em>unknown</em> $tableName, <em>unknown</em> $schemaName, <em>unknown</em> $index) inherited from Phalcon\Db\Adapter</p>
<p>Adds a primary key to a table</p>
<p>public <em>boolean</em>  <strong>dropPrimaryKey</strong> (<em>unknown</em> $tableName, <em>unknown</em> $schemaName) inherited from Phalcon\Db\Adapter</p>
<p>Drops a table&#8217;s primary key</p>
<p>public <em>boolean true</em>  <strong>addForeignKey</strong> (<em>unknown</em> $tableName, <em>unknown</em> $schemaName, <em>unknown</em> $reference) inherited from Phalcon\Db\Adapter</p>
<p>Adds a foreign key to a table</p>
<p>public <em>boolean true</em>  <strong>dropForeignKey</strong> (<em>unknown</em> $tableName, <em>unknown</em> $schemaName, <em>unknown</em> $referenceName) inherited from Phalcon\Db\Adapter</p>
<p>Drops a foreign key from a table</p>
<p>public <em>string</em>  <strong>getColumnDefinition</strong> (<em>unknown</em> $column) inherited from Phalcon\Db\Adapter</p>
<p>Returns the SQL column definition from a column</p>
<p>public <em>array</em>  <strong>listTables</strong> ([<em>unknown</em> $schemaName]) inherited from Phalcon\Db\Adapter</p>
<p>List all tables on a database</p>
<div class="highlight-php"><div class="highlight"><pre><span class="cp">&lt;?php</span>

    <span class="nb">print_r</span><span class="p">(</span><span class="nv">$connection</span><span class="o">-&gt;</span><span class="na">listTables</span><span class="p">(</span><span class="s2">&quot;blog&quot;</span><span class="p">));</span>
</pre></div>
</div>
<p>public <em>array</em>  <strong>listViews</strong> ([<em>unknown</em> $schemaName]) inherited from Phalcon\Db\Adapter</p>
<p>List all views on a database</p>
<div class="highlight-php"><div class="highlight"><pre><span class="cp">&lt;?php</span>

<span class="nb">print_r</span><span class="p">(</span><span class="nv">$connection</span><span class="o">-&gt;</span><span class="na">listViews</span><span class="p">(</span><span class="s2">&quot;blog&quot;</span><span class="p">));</span>
</pre></div>
</div>
<p>public <a class="reference internal" href="Phalcon_Db_Index.html"><em>Phalcon\Db\Index</em></a> [] <strong>describeIndexes</strong> (<em>unknown</em> $table, [<em>unknown</em> $schema]) inherited from Phalcon\Db\Adapter</p>
<p>Lists table indexes</p>
<div class="highlight-php"><div class="highlight"><pre><span class="cp">&lt;?php</span>

<span class="nb">print_r</span><span class="p">(</span><span class="nv">$connection</span><span class="o">-&gt;</span><span class="na">describeIndexes</span><span class="p">(</span><span class="s1">&#39;robots_parts&#39;</span><span class="p">));</span>
</pre></div>
</div>
<p>public <a class="reference internal" href="Phalcon_Db_Reference.html"><em>Phalcon\Db\Reference</em></a> [] <strong>describeReferences</strong> (<em>unknown</em> $table, [<em>unknown</em> $schema]) inherited from Phalcon\Db\Adapter</p>
<p>Lists table references</p>
<div class="highlight-php"><div class="highlight"><pre><span class="cp">&lt;?php</span>

 <span class="nb">print_r</span><span class="p">(</span><span class="nv">$connection</span><span class="o">-&gt;</span><span class="na">describeReferences</span><span class="p">(</span><span class="s1">&#39;robots_parts&#39;</span><span class="p">));</span>
</pre></div>
</div>
<p>public <em>array</em>  <strong>tableOptions</strong> (<em>unknown</em> $tableName, [<em>unknown</em> $schemaName]) inherited from Phalcon\Db\Adapter</p>
<p>Gets creation options from a table</p>
<div class="highlight-php"><div class="highlight"><pre><span class="cp">&lt;?php</span>

 <span class="nb">print_r</span><span class="p">(</span><span class="nv">$connection</span><span class="o">-&gt;</span><span class="na">tableOptions</span><span class="p">(</span><span class="s1">&#39;robots&#39;</span><span class="p">));</span>
</pre></div>
</div>
<p>public <em>boolean</em>  <strong>createSavepoint</strong> (<em>unknown</em> $name) inherited from Phalcon\Db\Adapter</p>
<p>Creates a new savepoint</p>
<p>public <em>boolean</em>  <strong>releaseSavepoint</strong> (<em>unknown</em> $name) inherited from Phalcon\Db\Adapter</p>
<p>Releases given savepoint</p>
<p>public <em>boolean</em>  <strong>rollbackSavepoint</strong> (<em>unknown</em> $name) inherited from Phalcon\Db\Adapter</p>
<p>Rollbacks given savepoint</p>
<p>public <a class="reference internal" href="Phalcon_Db_AdapterInterface.html"><em>Phalcon\Db\AdapterInterface</em></a>  <strong>setNestedTransactionsWithSavepoints</strong> (<em>unknown</em> $nestedTransactionsWithSavepoints) inherited from Phalcon\Db\Adapter</p>
<p>Set if nested transactions should use savepoints</p>
<p>public <em>boolean</em>  <strong>isNestedTransactionsWithSavepoints</strong> () inherited from Phalcon\Db\Adapter</p>
<p>Returns if nested transactions should use savepoints</p>
<p>public <em>string</em>  <strong>getNestedTransactionSavepointName</strong> () inherited from Phalcon\Db\Adapter</p>
<p>Returns the savepoint name to use for nested transactions</p>
<p>public <em>array</em>  <strong>getDescriptor</strong> () inherited from Phalcon\Db\Adapter</p>
<p>Return descriptor used to connect to the active database</p>
<p>public <em>string</em>  <strong>getConnectionId</strong> () inherited from Phalcon\Db\Adapter</p>
<p>Gets the active connection unique identifier</p>
<p>public <em>string</em>  <strong>getSQLStatement</strong> () inherited from Phalcon\Db\Adapter</p>
<p>Active SQL statement in the object</p>
<p>public <em>string</em>  <strong>getRealSQLStatement</strong> () inherited from Phalcon\Db\Adapter</p>
<p>Active SQL statement in the object without replace bound paramters</p>
<p>public <em>array</em>  <strong>getSQLBindTypes</strong> () inherited from Phalcon\Db\Adapter</p>
<p>Active SQL statement in the object</p>
</div>
</div>


                    </div>
                  </div>
                </div>
            </div>
          </td>
        </tr>
      </table>
    <div class="related">
      <ul>
        <li class="right" >
          <a href="../genindex.html" title="总目录"
             >索引</a></li>
        <li class="right" >
          <a href="Phalcon_Db_Adapter_Pdo_Sqlite.html" title="Class Phalcon\Db\Adapter\Pdo\Sqlite"
             >下一页</a> |</li>
        <li class="right" >
          <a href="Phalcon_Db_Adapter_Pdo_Oracle.html" title="Class Phalcon\Db\Adapter\Pdo\Oracle"
             >上一页</a> |</li>
          <li class="right"><a href="index.html" >API Indice</a> &raquo;</li> 
      </ul>
    </div>

      <div class="prefooter">
  <div class="container">
      <div class="row">
          <div class="col-sm-3 text-right">
              <span>Follow along:</span>
          </div>
          <div class="col-sm-6 text-center">
              <a href="https://twitter.com/phalconphp" alt="Twitter" class="btn-social btn-social-twitter"><i class="icon-twitter"></i></a>
              <a href="https://www.facebook.com/pages/Phalcon-Framework/134230726685897" alt="Facebook" class="btn-social btn-social-facebook"><i class="icon-facebook"></i></a>
              <a href="https://plus.google.com/102376109340560896457" alt="Google+" class="btn-social btn-social-googleplus"><i class="icon-googleplus"></i></a>
              <a href="https://github.com/phalcon/cphalcon" alt="Github" class="btn-social btn-social-github"><i class="icon-github"></i></a>
          </div>
          <div class="col-sm-3">
          </div>
      </div>
  </div>

</div>
<footer class="footer">
  <div class="container">
      <div class="row">
          <div class="col-xs-4 col-sm-3">
              <h4>Download</h4>
              <ul>
                  <li><a href="http://phalconphp.com/download">Installing Phalcon</a></li>
                  <li><a href="http://docs.phalconphp.com/en/latest/index.html" class="header-nav-link" target="_blank">Documentation</a></li>
                  <li><a href="http://api.phalconphp.com">API</a></li>
                  <li><a href="http://docs.phalconphp.com/en/latest/reference/tutorial.html">Tutorial</a></li>
                  <li><a href="http://docs.phalconphp.com/en/latest/reference/tutorial.html#sample-applications">Sample Applications</a></li>
              </ul>
          </div>
          <div class="col-xs-4 col-sm-3">
              <h4>Community</h4>
              <ul>
                  <li><a href="http://forum.phalconphp.com/" class="header-nav-link" target="_blank">Forum</a></li>
                  <li><a href="https://github.com/phalcon/cphalcon">GitHub</a></li>
                  <li><a href="https://github.com/phalcon/cphalcon/issues">Issue Tracker</a></li>
                  <li><a href="http://stackoverflow.com/questions/tagged/phalcon">Stack Overflow</a></li>
                  <li><a href="http://phalconphp.com/en/testimonials">Testimonials</a></li>
                  <li><a href="http://builtwith.phalconphp.com/">Built with Phalcon</a></li>
                  <li><a href="http://store.phalconphp.com/">Store</a></li>
              </ul>
          </div>
          <div class="col-xs-4 col-sm-2">
              <h4>About</h4>
              <ul>
                  <li><a class="link-black" href="http://blog.phalconphp.com/">Blog</a></li>
                  <li><a href="http://phalconphp.com/en/about">About</a></li>
                  <li><a href="http://phalconphp.com/en/team">Team</a></li>
                  <li><a href="http://phalconphp.com/en/roadmap">Roadmap</a></li>
                  <li><a href="http://phalconphp.com/en/donate">Donate</a></li>
                  <li><a href="http://phalconphp.com/en/consulting">Consulting</a></li>
                  <li><a href="http://phalconphp.com/en/hosting">Hosting</a></li>
              </ul>
          </div>
          <div id="license-spaccer" class="visible-xs"></div>
          <div id="license-wrapper" class="col-xs-12 col-sm-4">
              <p class="license">

                  Found a typo or an error? Want to improve this document? The documentation sources are available on <a href="http://github.com/phalcon/docs">Github</a><br>
                  Need support or have questions? Check our <a href="http://forum.phalconphp.com">Forum</a><br>
                  <br>

                  Phalcon Framework is released under the <a href="https://github.com/phalcon/cphalcon/blob/master/docs/LICENSE.md">new BSD license</a>.<br>
                  Except where otherwise noted, content on this site is licensed under the
                    <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 License.</a>

                <div class="design">
                  <span>Designed by:</span>

                  <a href="http://www.fog-city.net/" class="fogcity" target="_blank" title="Fog City Software"><span>Fog City Software</span></a>
              </div>
          </div>
      </div>
  </div>
</footer>

    </div>
    <script type="text/javascript">
    $(window).on("load", function(){
      var cx = '009733439235723428699:lh9ltjgvdz8';
      var gcse = document.createElement('script');
      gcse.type = 'text/javascript';
      gcse.async = true;
      gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//www.google.com/cse/cse.js?cx=' + cx;
      var s = document.getElementsByTagName('script')[0];
      s.parentNode.insertBefore(gcse, s);
    });
    </script>

  </body>
</html>